package cn.bistu.cs.music.util;

import okhttp3.OkHttpClient;
import okhttp3.Request;

public class HttpUtil {

    public static void sendOkHttpRequest(String address, okhttp3.Callback callback) {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
                                .url(address)
                                .build();
        //enqueue（callback）相当于excute（），但是异步执行，并且enqueue内部会开启子线程
        client.newCall(request).enqueue(callback);
    }

}